package com.tjzx.entity;

import java.sql.Timestamp;

/**
 * PeispatientFoodsId entity. @author MyEclipse Persistence Tools
 */

public class PeispatientFoodsId implements java.io.Serializable {

	// Fields

	private Integer id;
	private Integer idPatient;
	private Timestamp foodTime;
	private String foodType;
	private String foodName;
	private Double foodEnergy;
	private Double foodPer;
	private Timestamp createtime;

	// Constructors

	/** default constructor */
	public PeispatientFoodsId() {
	}

	/** minimal constructor */
	public PeispatientFoodsId(Integer id) {
		this.id = id;
	}

	/** full constructor */
	public PeispatientFoodsId(Integer id, Integer idPatient,
			Timestamp foodTime, String foodType, String foodName,
			Double foodEnergy, Double foodPer, Timestamp createtime) {
		this.id = id;
		this.idPatient = idPatient;
		this.foodTime = foodTime;
		this.foodType = foodType;
		this.foodName = foodName;
		this.foodEnergy = foodEnergy;
		this.foodPer = foodPer;
		this.createtime = createtime;
	}

	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getIdPatient() {
		return this.idPatient;
	}

	public void setIdPatient(Integer idPatient) {
		this.idPatient = idPatient;
	}

	public Timestamp getFoodTime() {
		return this.foodTime;
	}

	public void setFoodTime(Timestamp foodTime) {
		this.foodTime = foodTime;
	}

	public String getFoodType() {
		return this.foodType;
	}

	public void setFoodType(String foodType) {
		this.foodType = foodType;
	}

	public String getFoodName() {
		return this.foodName;
	}

	public void setFoodName(String foodName) {
		this.foodName = foodName;
	}

	public Double getFoodEnergy() {
		return this.foodEnergy;
	}

	public void setFoodEnergy(Double foodEnergy) {
		this.foodEnergy = foodEnergy;
	}

	public Double getFoodPer() {
		return this.foodPer;
	}

	public void setFoodPer(Double foodPer) {
		this.foodPer = foodPer;
	}

	public Timestamp getCreatetime() {
		return this.createtime;
	}

	public void setCreatetime(Timestamp createtime) {
		this.createtime = createtime;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof PeispatientFoodsId))
			return false;
		PeispatientFoodsId castOther = (PeispatientFoodsId) other;

		return ((this.getId() == castOther.getId()) || (this.getId() != null
				&& castOther.getId() != null && this.getId().equals(
				castOther.getId())))
				&& ((this.getIdPatient() == castOther.getIdPatient()) || (this
						.getIdPatient() != null
						&& castOther.getIdPatient() != null && this
						.getIdPatient().equals(castOther.getIdPatient())))
				&& ((this.getFoodTime() == castOther.getFoodTime()) || (this
						.getFoodTime() != null
						&& castOther.getFoodTime() != null && this
						.getFoodTime().equals(castOther.getFoodTime())))
				&& ((this.getFoodType() == castOther.getFoodType()) || (this
						.getFoodType() != null
						&& castOther.getFoodType() != null && this
						.getFoodType().equals(castOther.getFoodType())))
				&& ((this.getFoodName() == castOther.getFoodName()) || (this
						.getFoodName() != null
						&& castOther.getFoodName() != null && this
						.getFoodName().equals(castOther.getFoodName())))
				&& ((this.getFoodEnergy() == castOther.getFoodEnergy()) || (this
						.getFoodEnergy() != null
						&& castOther.getFoodEnergy() != null && this
						.getFoodEnergy().equals(castOther.getFoodEnergy())))
				&& ((this.getFoodPer() == castOther.getFoodPer()) || (this
						.getFoodPer() != null
						&& castOther.getFoodPer() != null && this.getFoodPer()
						.equals(castOther.getFoodPer())))
				&& ((this.getCreatetime() == castOther.getCreatetime()) || (this
						.getCreatetime() != null
						&& castOther.getCreatetime() != null && this
						.getCreatetime().equals(castOther.getCreatetime())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getId() == null ? 0 : this.getId().hashCode());
		result = 37 * result
				+ (getIdPatient() == null ? 0 : this.getIdPatient().hashCode());
		result = 37 * result
				+ (getFoodTime() == null ? 0 : this.getFoodTime().hashCode());
		result = 37 * result
				+ (getFoodType() == null ? 0 : this.getFoodType().hashCode());
		result = 37 * result
				+ (getFoodName() == null ? 0 : this.getFoodName().hashCode());
		result = 37
				* result
				+ (getFoodEnergy() == null ? 0 : this.getFoodEnergy()
						.hashCode());
		result = 37 * result
				+ (getFoodPer() == null ? 0 : this.getFoodPer().hashCode());
		result = 37
				* result
				+ (getCreatetime() == null ? 0 : this.getCreatetime()
						.hashCode());
		return result;
	}

}